fix(cli): version from package.json + npm-publish guard; bump 0.1.1#418
Merged
Conversation
…ublish failures - kars --version was hardcoded to 0.1.0-alpha.1 and drifted from the published package version. Read it from package.json via createRequire so it can never drift again (works in both dist/ and src/). - Bump @kars-runtime/cli to 0.1.1. The manually-published 0.1.0 lacked a README and provenance and npm forbids overwriting it; 0.1.1 lets CI publish a complete, provenance-signed version via OIDC. - Harden the release workflow npm-publish step: pre-check for an existing version (skip cleanly) and emit a loud ::warning:: annotation on a genuine publish failure, so a 'green but did not publish' outcome is visible in the run summary instead of being silently swallowed by continue-on-error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
… v* tags Both legacy workflows triggered on the same clean v[0-9]+.[0-9]+.[0-9]+ tags as the new release-public-interim.yml (the single public release pipeline), causing guaranteed failures on every public tag: - image-sign-sbom.yml targets karsacr.azurecr.io and fails on azure/docker-login with 'Input required: username' because the ACR_USERNAME/ACR_PASSWORD secrets don't exist (MCR not onboarded yet). - release.yml creates a bare GitHub Release for the tag, colliding with the richer signed release that release-public-interim.yml creates for the same tag. Make both dispatch-only so they no longer auto-fire on v* tags. Public release images are signed via keyless cosign on GHCR in the canonical pipeline; image-sign-sbom.yml can be dispatched manually once ACR creds are provisioned. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
kars --versionprinted a hardcoded0.1.0-alpha.1(drifted from the actual package version).@kars-runtime/cli@0.1.0lacks a README and provenance, and npm forbids overwriting it — so the CI OIDC publish silently no-op'd undercontinue-on-error.Changes
cli/src/cli.ts— read the version frompackage.jsonviacreateRequireso it never drifts (works indist/andsrc/).@kars-runtime/cli→ 0.1.1 so CI can publish a clean, README-included, provenance-signed version.release-public-interim.ymlnpm step — pre-check for an existing version (skip cleanly) and emit a loud::warning::annotation on a real publish failure, so a 'green but didn't publish' outcome is visible instead of silently swallowed.Verify
npm run build && node dist/index.js --version→0.1.1package.jsonat the path the built CLI resolves.